package gui;

import java.awt.EventQueue;
import java.awt.event.ActionEvent;
import java.awt.event.ActionListener;

import javax.swing.JButton;
import javax.swing.JFrame;
import javax.swing.JLabel;
import javax.swing.JPanel;
import javax.swing.JTextPane;

import businessobjects.*;

public class infoBox {

	private JFrame frminfoBox;
	private User user = null;
	private Test test = new Test();

	/**
	 * Launch the application.
	 */
	public static void main(String[] args) {
		EventQueue.invokeLater(new Runnable() {
			public void run() {
				try {
					infoBox window = new infoBox();
					window.frminfoBox.setVisible(true);
				} catch (Exception e) {
					e.printStackTrace();
				}
			}
		});
	}

	/**
	 * Create the application.
	 */
	public infoBox() {
		initialize();
	}

	/**
	 * Initialize the contents of the frame.
	 */
	private void initialize() {
		user = new User();
		frminfoBox = new JFrame();
		//frminfoBox.setBounds(100, 100, 450, 300);
		frminfoBox.setTitle("mathKwiz - Info");
		frminfoBox.setSize(400,250);
		frminfoBox.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);

		JPanel panel = new JPanel();
		panel.setLayout(null);
		
		JLabel frage = new JLabel("mathKwiz 0.5 beta");
		frage.setBounds(6, 9, 368, 14);
		panel.add(frage);
		
		JLabel lblNewLabel = new JLabel("Florian Schnidrig & Simon Korteweg");
		lblNewLabel.setBounds(6, 34, 368, 14);
		panel.add(lblNewLabel);
		
		frminfoBox.getContentPane().add(panel);
		
		JButton btnZurck = new JButton("Zur\u00FCck");
		btnZurck.addActionListener(new ActionListener() {
			public void actionPerformed(ActionEvent e) {
				frminfoBox.setVisible(false);
				mathKwiz window;
				window = new mathKwiz(user, test);
				window.main(null);
			}
		});
		
		btnZurck.setBounds(6, 178, 80, 23);
		panel.add(btnZurck);
		
		
		
	}
}
